Skip to content

Un-blind the link checker, tighten the ratchet, and require breaking new tests - #574

Merged
pftg merged 2 commits into
masterfrom
gate-fixes
Aug 22, 2026
Merged

Un-blind the link checker, tighten the ratchet, and require breaking new tests#574
pftg merged 2 commits into
masterfrom
gate-fixes

Conversation

@pftg

@pftg pftg commented Aug 22, 2026

Copy link
Copy Markdown
Member

Follow-through on the fault-injection audit (#572 / 20.11), which caught 3 of 8 planted defects.

The link checker was inspecting almost nothing

Production renders internal links absolute; lychee --offline excludes every http(s) URI by design. 133,874 of 149,516 links were excluded — the homepage's single "OK" was its own #main-content skip-link anchor. It had been green for a year. --remap onto the built tree takes it to 114,050 links checked.

Turning it on found five real defects nobody could see:

Defect Cause
/blog/2025/complete-guide-... ×2 link carried the directory; the slug drops it
/blog/rails-8-1-...-end-lost-... ×3 link used the directory name; real slug omits it
that post's own canonical_url self-canonical pointing at a 404
/contact/ ×2 a conversion path; should be /contact-us/
/resources/internal-product-roi-calculator never existed

The last one wasn't a broken link. The section promised an "Internal Product ROI Calculator" spreadsheet and itemised five things inside it, "no email required, instant download". There is no /resources/ section, and the sibling lead magnet shows the real pattern (content/lead-magnets/ + download_file). A promise with nothing behind it is the same class as an unsourced number, so it's removed — the post already closed with a working consultation CTA. If the calculator exists somewhere, say so and it comes back as a real lead magnet.

Two ratchet gaps

RENDERED_BASELINE sat at 14 against an actual 11 — those three spare hits swallowed a planted banned phrase whole. Tightened to 11 and proven exact (fails at 10, passes at 11). SURFACES never globbed content/next/**, so the entire v2 rail had no source-side cover.

New standing rule

A new test isn't done until you've broken the code and watched it fail. Green proves a test runs, not that it works — and the two are indistinguishable in CI. Inject the defect, quote the failure, revert, re-run green. Both halves are the evidence. Where a gate genuinely can't discriminate yet (derived tenure is blind until 2027-01-01), say so in the test body rather than letting a pass read as proof. In CLAUDE.md §TDD and .okf/build/test-gates.md.

Verified

rake test:links 0 errors / 114,050 OK · unit 287 runs, 6143 assertions, 0 failures · bin/hugo-build clean. Content-only changes otherwise, so the visual suites don't apply.

🤖 Generated with Claude Code

https://claude.ai/code/session_011SP5gaqXEgUie8pdFrmbeJ

pftg and others added 2 commits August 22, 2026 12:09
The fault-injection audit (20.11) planted a broken link and watched it pass.
Cause: production renders internal links absolute and lychee --offline
excludes every http(s) URI, so 133,874 of 149,516 links were excluded and the
job was green because it inspected almost nothing - the homepage's single OK
was its own skip-link anchor. --remap resolves them against the built tree:
15,642 -> 114,050 links actually checked.

Turning it on found five real defects nobody could see:
- /blog/2025/complete-guide-... x2: the link carried the directory, the slug
  drops it
- /blog/rails-8-1-active-job-continuations-END-LOST-... x3: link used the
  directory name, the real slug omits it - and the post's OWN canonical_url
  pointed at that 404
- /contact/ x2 (a conversion path) should be /contact-us/
- /resources/internal-product-roi-calculator: never existed. The section
  promised a spreadsheet and itemised five things inside it, no-email
  instant-download. There is no /resources/ section; the sibling lead magnet
  shows the real pattern (content/lead-magnets/ + download_file). A promise
  with nothing behind it is the same class as an unsourced number, so it is
  removed - the post already closed with a working consultation CTA.

Same audit: the rendered banned-phrase ratchet sat at 14 against an actual 11,
and those three spare hits swallowed a planted banned adjective whole.
Tightened to 11 and proven exact (fails at 10). SURFACES never globbed
content/next/**, so the v2 rail had no source-side cover at all.

Verified: links 0 errors / 114,050 OK; unit 287 runs, 6143 assertions, 0
failures; hugo-build clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011SP5gaqXEgUie8pdFrmbeJ
Paul, 2026-08-22. Green proves a test RUNS; it does not prove it WORKS, and
the two look identical in CI. The rule now says inject the defect the test
exists to catch, quote the failure, then revert and re-run green - both halves
are the evidence.

Grounded in what the fault-injection audit measured the same day: the
testimonial gate would have passed a vanished blockquote (every string
contains ""), the rendered ratchet had 3 hits of slack that swallowed a
planted phrase, and the link job excluded 90% of links while reporting green
for a year. Also states the honest converse: when a gate cannot discriminate
yet (derived tenure, blind until 2027-01-01), write that in the test rather
than letting a pass read as proof.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011SP5gaqXEgUie8pdFrmbeJ
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 26e9faf3-a8f1-4117-834e-1d0eac8d94d4


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pftg
pftg merged commit cb23b37 into master Aug 22, 2026
5 checks passed
@pftg
pftg deleted the gate-fixes branch August 22, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant